package org.micode.libs.dao.base;

import org.apache.ibatis.annotations.Param;
import org.micode.common.domain.Page;
import org.micode.common.domain.base.BaseEntity;

import java.util.List;
import java.util.Map;

/**
 * 实体类的读取器基类
 */
public interface BaseInitDao<T extends BaseEntity> {

    T getByKey(@Param("key") Object key);

    List<Long> countByConditions(@Param("queryConditions") Map<String, Object> queryConditions,
                                 @Param("extConditions") List<String> extConditions);

    List<T> listByConditions(@Param("queryConditions") Map<String, Object> queryConditions,
                             @Param("extConditions") List<String> extConditions,
                             @Param("page") Page page,
                             @Param("orderBy") String orderBy);

}
